<?php

namespace app\index\service;

use app\index\dao\MemberDao;
use app\index\model\UM as UM;

/**
 * Class InviteRewardConfirmService
 * @package app\index\service
 */
class InviteRewardConfirmService
{
    // dao
    private MemberDao $memberDao;

    public function __construct(MemberDao $memberDao)
    {
        $this->memberDao = $memberDao;
    }

    /**
     * 新增
     * @param UM $user
     * @param array $params
     * @return  void
     */
    public function add(UM $user, array $params): void
    {
        $now = time();

        $user->inviteCoinTime = $now;
        $user->inviteCardTime = $now;
        $user->save();
    }

}
